//
//  BigCell.m
//  ChampoinPeso
//
//  Created by mac on 2025/2/15.
//

#import "BigCell.h"
@interface BigCell()
@property (nonatomic,strong)UIScrollView *scrollView;
@property (nonatomic,strong)UIView *scrollContentView;
@end
@implementation BigCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
//        UIScrollView *scroll = [[UIScrollView alloc]initWithFrame:CGRectZero];
//        [self.contentView addSubview:scroll];
//        [scroll mas_makeConstraints:^(MASConstraintMaker *make) {
//            make.top.right.bottom.mas_offset(0);
//            make.left.mas_offset(13);
//        }];
//        _scrollView = scroll;
//        [_scrollView addSubview:self.scrollContentView];
//        [self.scrollContentView mas_makeConstraints:^(MASConstraintMaker *make) {
//            make.edges.equalTo(_scrollView);
//            make.height.mas_equalTo(150);
//        }];
        [self setupUI];
    }
    return self;
}
-(void)setupUI{
    UIView *view = [UIView new];
    [self.contentView addSubview:view];
    [view mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.bottom.mas_offset(0);
        make.left.mas_offset(14);
        make.right.mas_offset(-14);
    }];
    UIImageView *img = [UIImageView new];
    img.image = [UIImage imageNamed:@"home_big_img"];
    [view addSubview:img];
    [img mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.top.bottom.mas_offset(0);
//        make.height.mas_equalTo(336);
        }];
//    NSArray *imgs = @[@"t1",@"t2",@"t3",@"t4",@"t5",@"t6"];
//    for (int i = 0; i<6; i++) {
//        UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
//        [btn setImage:[UIImage imageNamed:imgs[i]] forState:UIControlStateNormal];
//        [_scrollContentView addSubview:btn];
//        [btn mas_makeConstraints:^(MASConstraintMaker *make) {
//            make.top.mas_offset(10);
//            make.left.mas_offset(105*i);
//            if (i==5) {
//                make.right.mas_offset(-15);
//            }
//        }];
//    }
//    UIView *line = [UIView new];
//    line.layer.cornerRadius = 6;
//    line.backgroundColor = UIColor.whiteColor;
//    [_scrollContentView addSubview:line];
//    [_scrollContentView sendSubviewToBack:line];
//    [line mas_makeConstraints:^(MASConstraintMaker *make) {
//        make.top.mas_offset(15);
//        make.left.mas_offset(0);
//        make.right.mas_offset(-15);
//        make.height.mas_equalTo(12);
//    }];

}
-(UIView *)scrollContentView{
    if (!_scrollContentView) {
        _scrollContentView = [UIView new];
    }
    return _scrollContentView;
}


@end
